package com.gupt.weekly.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author linzizun
 * @version 1.0
 * @date 2021/04/12 17:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "数据条目")
@TableName(value = "tb_report_item")
public class ReportItem {
    @ApiModelProperty(value = "主键非空", example = "创建新用户不要传此字段，会自动生成")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @NotBlank(message = "请发送数据内容")
    @ApiModelProperty(value = "数据，非空，记录条目内容")
    private String data;

    @NotBlank(message = "请发送上级id")
    @ApiModelProperty(value = "上级id，关联本表.id（根节点：project、work）")
    private String parent_id;
}
